]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
layout: Destroy non-adopted uiGroup actors
authorJonas Ådahl <jadahl@gmail.com>
Wed, 17 Aug 2022 14:30:53 +0000 (16:30 +0200)
committerJonas Ådahl <jadahl@gmail.com>
Fri, 25 Nov 2022 21:09:37 +0000 (22:09 +0100)
Move back actors that were adopted from mutter (window_group,
top_window_group, the feedback group) from the uiGroup to the stage, and
then destroy the uiGroup. This will tear down more or less all of GNOME
Shells actors gracefully.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1349>

js/ui/layout.js

index 69bf148919913d2f10bdaf5b9abec7b819c9f5a8..6be7cd041c5e503676677c54c542ed905c2a7e38 100644 (file)
@@ -221,6 +221,20 @@ var LayoutManager = GObject.registerClass({
 
         global.stage.remove_actor(global.window_group);
         this.uiGroup.add_actor(global.window_group);
+        global.connect('shutdown', () => {
+            const adoptedUiGroupActors = [
+                global.window_group,
+                global.top_window_group,
+                Meta.get_feedback_group_for_display(global.display),
+            ];
+
+            for (let adoptedActor of adoptedUiGroupActors) {
+                this.uiGroup.remove_actor(adoptedActor);
+                global.stage.add_actor(adoptedActor);
+            }
+
+            this.uiGroup.destroy();
+        });
 
         // Using addChrome() to add actors to uiGroup will position actors
         // underneath the top_window_group.